# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Tobias Kieslich <tobias@justdreams.de>

pkgname=gthumb
pkgver=3.12.4
pkgrel=1
pkgdesc="Image browser and viewer for the GNOME Desktop"
url="https://wiki.gnome.org/Apps/gthumb"
arch=(loong64 x86_64)
license=(GPL)
depends=(
  clutter-gtk
  dconf
  gsettings-desktop-schemas
  gst-plugin-gtk
  gst-plugins-base-libs
  json-glib
  libheif
  libjxl
  librsvg
  libsecret
  libsoup
  libwebp
  webkit2gtk
)
makedepends=(
  brasero
  docbook-xsl
  exiv2
  git
  liboauth
  libraw
  meson
  yelp-tools
)
optdepends=(
  'brasero: burn discs'
  'exiv2: metadata support'
  'liboauth: web albums'
  'libraw: read RAW files'
)
_commit=6b0bbc693626a5b848c55febab978f983bbef8eb  # tags/3.12.4^0
source=(
  "git+https://gitlab.gnome.org/GNOME/gthumb.git#commit=$_commit"
)
b2sums=('SKIP')

pkgver() {
  cd gthumb
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd gthumb
}

build() {
  arch-meson gthumb build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
